// 因为less是一个预处理器，--定义变量--颜色--方法

// 引用less公共样式文件
@import './common.less';

/* 全局页面通用配置 ----start----*/
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "微软雅黑", Arial, sans-serif;
}

*:before,
*:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    height: 100%;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "微软雅黑", Arial, sans-serif;
    font-size: 20px;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    position: relative;
    height: 100%;
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "微软雅黑", Arial, sans-serif;
    // 浏览器默认额字体是16px === 1rem 23px === ?
    font-size: 20px;
    line-height: 1.42857143;
    color: @c33;
    background-color: @cff;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
    display: block;
}

audio,
canvas,
progress,
video {
    display: inline-block;
    vertical-align: baseline;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 全局页面通用配置 ----end----*/

.application-container {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99;
    // 与父元素同级
    &.no-header{
        > main {
            display: block;
            position: relative;
            width: 100%;
            height: 100%;
        }
    }
    > header {
        display: block;
        position: relative;
        height: 48px;
        padding: 8px 0;
        background: @primary;
        .clear();

        >.left,
        >.right {
            float: left;
            position: relative;
            height: 32px;
            z-index: 8;
        }
        >.right {
            float: right;
        }
        >.center {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 48px;
            line-height: 48px;
            text-align: center;
            font-size: 1rem;
            color: @cff;
            z-index: 1;
        }
        i {
            float: left;
            width: 36px;
            height: 32px;
            background: url(../images/shouye.png) center center / 30px 30px no-repeat;
            &.back {
                background-image: url(../images/fanhui.png);
            }
            &.new {
                background-image: url(../images/tianjia.png);
            }
        }
    }
    > main {
        display: block;
        position: relative;
        height: calc(100% - 48px);
        background-color: @cf5;
        overflow-x: hidden;
        &::before {
            content: '';
            display: block;
            width: 0;
            height: 0px;
        }
    }
}

// 列表页面样式
.page-list-box {
    display: block;
    position: relative;
    height: 100%;
    padding: 0 12px;
    overflow-x: hidden;
    > .item {
        display: block;
        position: relative;
        border-bottom: 1px solid @cdd;
        padding: 10px 0;
        .span {
            display: block;
            position: relative;
            line-height: 18px;
            margin-bottom: 12px;
            font-size: 0.8rem;
            color: @c99;
            &.itemTitle {
                color: @c1e;
                font-size: 1rem;
                line-height: 26px;
                em {
                    font-style: normal;
                    font-size: .7rem;
                    color: @primary;
                    margin-left: 12px;
                }
            }
        }
        .my-btn {
            height: 100%;
            color: #fff;
        }
        .opt {
            display: block;
            position: absolute;
            top: 50%;
            right: 0;
            width: 36px;
            margin-top: -36px;
            > i {
                display: block;
                height: 36px;
                width: 36px;
                background: url(../images/edit-icon.png) center center / 32px 32px no-repeat;
                &.del{
                    background: url(../images/close-icon.png) center center / 32px 32px no-repeat;
                }
            }
        }
    }
    .loading {
            display: block;
            text-align: center;
            line-height: 36px;
            font-size: .6rem;
            color: @c99;
        }
}

// 带查询头的页面布局样式
.page-container {
    display: block;
    position: relative;
    height: 100%;
    > header {
        display: block;
        height: 49px;
        padding: 8px 0;
        border-bottom: 1px solid @cdd;
        background-color: transparent;
    }
    > section {
        display: block;
        height: calc(100% - 49px);
        overflow-x: hidden;
    }
}
.purchase-dropdown {
    flex: 0 0 80px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    .van-dropdown-menu__bar{
        height: 32px;
        background-color: transparent;
        box-shadow: none;
    }
}